package domain.worm;

import java.awt.Color;

import images.GameImagesMap;
import images.Images;

import com.uqbar.vainilla.DeltaState;
import com.uqbar.vainilla.appearances.Appearance;
import com.uqbar.vainilla.appearances.Circle;
import com.uqbar.vainilla.appearances.Sprite;
import com.uqbar.vainilla.events.constants.Key;

public class StandbyState extends WormState {
	
	public StandbyState(Worm worm) {
		super(worm);
		worm.setAppearance(getStill());
	}

	@Override
	public void update(DeltaState deltaState) {
	}

	private Appearance getStill() {
		return GameImagesMap.getImage("wormStill" + this.getWorm().getDir());
	}

	public void walk(DeltaState delta, int dir) {
		this.getWorm().dissembleTeam();
		this.getWorm().dissembleIndicador();
		this.getWorm().setState(new WalkingState(this.getWorm()));
		this.getWorm().getState().walk(delta,dir);
	}

	public void jump(){
		this.getWorm().dissembleTeam();
		this.getWorm().dissembleIndicador();
		this.getWorm().setState(new JumpingState(this.getWorm()));
	}
	public void aim(){
		this.getWorm().dissembleTeam();
		this.getWorm().dissembleIndicador();
		this.getWorm().setState(new PointingState(this.getWorm()));
	}

}
